import { cached } from '@/utils'
import { getEnumDict, ENUM_MAP } from './enumDict'

const tags = {
  1: 'success',
  2: 'warning',
  9: 'info'
}

export async function getOutType() {
  const { data } = await getEnumDict(ENUM_MAP.applyTypeOut)
  return data
}

export const outTypeTag = cached(val => tags[val])
